{% extends '::base.html.twig' %}

{% block title %}
    {{ parent() }} | Emails
{% endblock %}

{% block headerContent %}
    <h1>
        Emails
        <small>View</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{ path('jumph_email_overview') }}"><i class="fa fa-envelope"></i> Emails</a></li>
        <li> View</li>
    </ol>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-lg-8 col-md-12">
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">Email</h3>
                </div>
                <div class="box-body">
                    <dl class="dl-horizontal">
                        <dt>Subject</dt>
                        <dd>{{ email.subject }}</dd>
                        <dt>Body</dt>
                        <dd>{{ email.body }}</dd>
                    </dl>
                </div>
                <div class="box-footer">
                    <!-- Potential footer -->
                </div>
            </div>
        </div>

        <div class="col-lg-4 col-md-12">
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">Company</h3>
                </div>
                <div class="box-body">
                    <dl class="dl-horizontal">
                        <dt>Name</dt>
                        <dd>{{ email.company is not null ? email.company.name : "" }}</dd>
                    </dl>
                </div>
                <div class="box-footer">
                    <!-- Potential footer -->
                </div>
            </div>

            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">Received from</h3>
                </div>
                <div class="box-body">
                    <dl class="dl-horizontal">
                        <dt>Name</dt>
                        <dd>{{ email.employee is not null ? email.employee.firstname ~ " " ~ email.employee.lastname  : "" }}</dd>
                        <dt>Email</dt>
                        <dd>{{ email.employee is not null ? email.employee.email : "" }}</dd>
                    </dl>
                </div>
                <div class="box-footer">
                    <!-- Potential footer -->
                </div>
            </div>

            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">Project</h3>
                </div>
                <div class="box-body">
                    <dl class="dl-horizontal">
                        <dt>Name</dt>
                        <dd>{{ email.project is not null ? email.project.name : "" }}</dd>
                    </dl>
                </div>
                <div class="box-footer">
                    <!-- Potential footer -->
                </div>
            </div>
        </div>
    </div>
{% endblock %}
